
var xhrArgsLeftGET = {
    url: "",
    handleAs: "text",
    load: function(data) {
        dijit.byId("divLeftPane").attr("content", data);
    },
    error: function(error) {
                
    }
};
var xhrArgsGET = {
    url: "",
    handleAs: "text",
    load: function(data) {
        dijit.byId("divCenterPane").attr("content", data);
    },
    error: function(error) {
                
    }
};

var xhrArgsPOST = {
    form: null,
    handleAs: "text",
    load: function(data) {
        onSubmit(data);
    },
    error: function(error) {
        setMessage("Error ", true);
    }
};

function setMessage(message, isError){
    var color=(isError==null || !isError) ? "blue": "red";
    dojo.byId("divMessage").innerHTML="<span style='color:"+color+";'>"+message+"</span>";
}

function get(page){
    xhrArgsGET.url=page;
    dojo.xhrGet(xhrArgsGET);
}

function getLeft(page){
    xhrArgsLeftGET.url=page;
    dojo.xhrGet(xhrArgsLeftGET);
}

function post(form, handleAs){
    xhrArgsPOST.form=dojo.byId(form);
    if(handleAs!=null){
        xhrArgsPOST.handleAs=handleAs;
    }
    dojo.xhrPost(xhrArgsPOST);
}

function showSignUp(){
    xhrArgsGET.url="signUp.htm";
    dojo.xhrGet(xhrArgsGET);
}
            
function frmSignUp(){
    xhrArgsPOST.form=dojo.byId("frmNewUser");
}


            
            
